Skip to content

C++: Tidy up SubBasicBlocks.qll#1827

Merged
geoffw0 merged 7 commits into
github:masterfrom
jbj:sbb-tidy
Aug 29, 2019
Merged

C++: Tidy up SubBasicBlocks.qll#1827
geoffw0 merged 7 commits into
github:masterfrom
jbj:sbb-tidy

Conversation

@jbj

@jbj jbj commented Aug 26, 2019

Copy link
Copy Markdown
Contributor

This series of commits tidies up my rather crude performance fixes from #1824. I decided to leave one pragma[nomagic] on a predicate that seemed to be sensitive to context in my experiments. The SubBasicBlocks library is intended to be used in many different contexts.

This PR does not have the 1.22 milestone. I believe the library in 1.22 is performant, correct, and well tested.

jbj and others added 5 commits August 26, 2019 16:01
@jbj jbj added the C++ label Aug 26, 2019
@jbj jbj requested review from geoffw0 and pavgust August 26, 2019 19:54
@jbj jbj requested a review from a team as a code owner August 26, 2019 19:54

@dave-bartolomeo dave-bartolomeo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes all LGTM. Thanks especially for using "rank"/"index" instead of "pos".

jbj added 2 commits August 28, 2019 08:29
This predicte was still used in a test, so it might be used in external
code too.
@jbj

jbj commented Aug 28, 2019

Copy link
Copy Markdown
Contributor Author

Added two commits to fix the failing test.

* returns a 0-based position, while `getRankInBasicBlock` returns a 1-based
* position.
*/
deprecated int getPosInBasicBlock(BasicBlock bb) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we adding a deprecated predicate? Is there another part to this change?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... ah, looks like I was viewing an old version of the PR, or possibly a single commit.

@geoffw0 geoffw0 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@geoffw0

geoffw0 commented Aug 29, 2019

Copy link
Copy Markdown
Contributor

Time to merge this I think.

@geoffw0 geoffw0 merged commit 1215da2 into github:master Aug 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants